// #include<bits/stdc++.h>
#include<cstdio>
using namespace std;
const int maxn = 2006;
char S[maxn];
int n;
void solve() {
  int a=0, b=n-1;
  int cnt=0;
  while(a<=b) {
    bool left = false;
    for(int i=0; a+i<=b; ++i) {
      if(S[a+i] < S[b-i]) {
        left = true;
        break;
      }
      else if (S[a+i] > S[b-i]) {
        left = false;
        break;
      }
    }
    if(left)putchar(S[a++]);
    else putchar(S[b--]);
    if(++cnt%80==0)putchar('\n');
  }
  putchar('\n');
}
int main() {
  scanf(" %d", &n);
  char ch;
  for(int i=0; i<n; ++i) {
    scanf(" %c", S+i);
  }
  solve();
  return 0;
}